<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
  <head>
    <title>Example: Full - jWYSIWYG</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../jwysiwyg/jquery.wysiwyg.css" type="text/css" />
    <link rel="stylesheet" href="../jwysiwyg/jquery.wysiwyg.modal.css" type="text/css" />
    <link rel="stylesheet" href="../lib/jquery.simplemodal.css" type="text/css" />
  </head>
  <body>
    <h1>jWYSIWYG</h1>
    <h2>Example: Full</h2>
    <noscript>Enable JavaScript to use WYSIWYG features.</noscript>
    <div>
      <textarea name="wysiwyg" id="wysiwyg" rows="5" cols="103"></textarea>
    </div>
    <label><input type="checkbox" value="1" id="click-inform" /> Inform about clicks.</label>
    <script type="text/javascript" src="../lib/jquery-1.4.2.js"></script>
        <script type="text/javascript" src="../jwysiwyg/jquery.wysiwyg.js"></script>
        <script type="text/javascript" src="../lib/jquery.simplemodal.js"></script>
    <script type="text/javascript">
(function($)
{
  $('#wysiwyg').wysiwyg({
    controls: {
      strikeThrough : { visible : true },
      underline     : { visible : true },
      
      justifyLeft   : { visible : true },
      justifyCenter : { visible : true },
      justifyRight  : { visible : true },
      justifyFull   : { visible : true },
      
      indent  : { visible : true },
      outdent : { visible : true },
      
      subscript   : { visible : true },
      superscript : { visible : true },
      
      undo : { visible : true },
      redo : { visible : true },
      
      insertOrderedList    : { visible : true },
      insertUnorderedList  : { visible : true },
      insertHorizontalRule : { visible : true },

      h4: {
              visible: true,
              className: 'h4',
              command: ($.browser.msie || $.browser.safari) ? 'formatBlock' : 'heading',
              arguments: ($.browser.msie || $.browser.safari) ? '<h4>' : 'h4',
              tags: ['h4'],
              tooltip: 'Header 4'
      },
      h5: {
              visible: true,
              className: 'h5',
              command: ($.browser.msie || $.browser.safari) ? 'formatBlock' : 'heading',
              arguments: ($.browser.msie || $.browser.safari) ? '<h5>' : 'h5',
              tags: ['h5'],
              tooltip: 'Header 5'
      },
      h6: {
              visible: true,
              className: 'h6',
              command: ($.browser.msie || $.browser.safari) ? 'formatBlock' : 'heading',
              arguments: ($.browser.msie || $.browser.safari) ? '<h6>' : 'h6',
              tags: ['h6'],
              tooltip: 'Header 6'
      },
      
      cut   : { visible : true },
      copy  : { visible : true },
      paste : { visible : true },
      html  : { visible: true },
      exam_html: { exec: function() { this.insertHtml('<abbr title="exam">Jam</abbr>') }, visible: true  }
    },
    events: {
      click : function(e)
      {
        if ($('#click-inform:checked').length > 0)
        {
          e.preventDefault();
          alert('You have clicked jWysiwyg content!');
        }
      }
    }
  });

  $('#wysiwyg').wysiwyg('insertHtml', 'sample code');

})(jQuery);

    </script>
  </body>
</html>
